﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.ObjectFactory.Adapters;

namespace YasharEl.Infrastructure.ProcessEngine.ServiceModel.Adapters.Maps
{
    public class ProcessDefinitionToProcessDefinitionDTOMap : TypeMapConfigurationBase<IProcessDefinition, ProcessDefinitionDTO>
    {
        protected override void BeforeMap(ref IProcessDefinition source)
        {
        }

        protected override void AfterMap(ref ProcessDefinitionDTO target, params object[] moreSources)
        {
            //Don't need
        }

        protected override ProcessDefinitionDTO Map(IProcessDefinition source)
        {
            ProcessDefinitionDTO target = new ProcessDefinitionDTO();

            target.ProcessDefinitionId = source.ProcessDefinitionId;
            target.ProcessDefinitionName = source.Name;
            target.ProcessDefinitionDescription = source.Description;

            return target;
        }
    }
}
